package com.example.attack.utils;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class R {

    private Integer code;
    private String msg;
    private Object data;

    public R(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static R success(String msg, Object data){
        return new R(200, msg, data);
    }

    public static R success(String msg){
        return new R(200, msg);
    }
}
